package org.mespilus.mespilusweb.datalayer.productmanagement;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class CoopProduct extends Product {

	public enum Day {
		SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY
	}
	
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	protected int idCoopProduct;
	
	@Persistent
	protected boolean isActive;
	
	@Persistent
	protected Day startDay;
	
	@Persistent
	protected Day endDay;
	
	public CoopProduct(CategoryProduct category, String description, String name) {
		super(category, description, name);
		isActive = true;
	}

	public boolean isActive() {
		return isActive;
	}

	public void setActive(boolean isActive) {
		this.isActive = isActive;
	}
	

}
